<xi:include href="xml/gdkcontentprovider.xml" />
<xi:include href="xml/gdkcontentserializer.xml" />
<xi:include href="xml/gdkcontentdeserializer.xml" />
- <xi:include href="xml/properties.xml" />
<xi:include href="xml/gdkapplaunchcontext.xml" />
<xi:include href="xml/pixbufs.xml" />
<xi:include href="xml/pango_interaction.xml" />
gdk_content_formats_builder_get_type
</SECTION>
-<SECTION>
-<TITLE>Properties and Atoms</TITLE>
-<FILE>properties</FILE>
-GdkAtom
-gdk_text_property_to_utf8_list_for_display
-</SECTION>
-
<SECTION>
<TITLE>Pango Interaction</TITLE>
<FILE>pango_interaction</FILE>
display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
display_class->create_surface = _gdk_broadway_display_create_surface;
display_class->get_keymap = _gdk_broadway_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_broadway_display_text_property_to_utf8_list;
display_class->get_n_monitors = gdk_broadway_display_get_n_monitors;
display_class->get_monitor = gdk_broadway_display_get_monitor;
#include "gdkdragprivate.h"
#include "gdksurfaceprivate.h"
-#include "gdkproperty.h"
#include "gdkprivate-broadway.h"
#include "gdkinternals.h"
#include "gdkdisplay-broadway.h"
int y,
int width,
int height);
-gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
GdkKeymap* _gdk_broadway_display_get_keymap (GdkDisplay *display);
void _gdk_broadway_display_consume_all_input (GdkDisplay *display);
BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
+++ /dev/null
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-#include "gdkprivate-broadway.h"
-#include "gdkdisplay-broadway.h"
-
-#include <string.h>
-
-
-static gint
-make_list (const gchar *text,
- gint length,
- gboolean latin1,
- gchar ***list)
-{
- GSList *strings = NULL;
- gint n_strings = 0;
- gint i;
- const gchar *p = text;
- const gchar *q;
- GSList *tmp_list;
- GError *error = NULL;
-
- while (p < text + length)
- {
- gchar *str;
-
- q = p;
- while (*q && q < text + length)
- q++;
-
- if (latin1)
- {
- str = g_convert (p, q - p,
- "UTF-8", "ISO-8859-1",
- NULL, NULL, &error);
-
- if (!str)
- {
- g_warning ("Error converting selection from STRING: %s",
- error->message);
- g_error_free (error);
- }
- }
- else
- {
- str = g_strndup (p, q - p);
- if (!g_utf8_validate (str, -1, NULL))
- {
- g_warning ("Error converting selection from UTF8_STRING");
- g_free (str);
- str = NULL;
- }
- }
-
- if (str)
- {
- strings = g_slist_prepend (strings, str);
- n_strings++;
- }
-
- p = q + 1;
- }
-
- if (list)
- {
- *list = g_new (gchar *, n_strings + 1);
- (*list)[n_strings] = NULL;
- }
-
- i = n_strings;
- tmp_list = strings;
- while (tmp_list)
- {
- if (list)
- (*list)[--i] = tmp_list->data;
- else
- g_free (tmp_list->data);
-
- tmp_list = tmp_list->next;
- }
-
- g_slist_free (strings);
-
- return n_strings;
-}
-
-gint
-_gdk_broadway_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
- g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
-
- if (encoding == g_intern_static_string ("STRING"))
- {
- return make_list ((gchar *)text, length, TRUE, list);
- }
- else if (encoding == g_intern_static_string ("UTF8_STRING"))
- {
- return make_list ((gchar *)text, length, FALSE, list);
- }
-
- if (list)
- *list = NULL;
- return 0;
-}
-
'gdkglobals-broadway.c',
'gdkkeys-broadway.c',
'gdkmonitor-broadway.c',
- 'gdkselection-broadway.c',
'gdksurface-broadway.c',
])
#include <gdk/gdkpaintable.h>
#include <gdk/gdkpango.h>
#include <gdk/gdkpixbuf.h>
-#include <gdk/gdkproperty.h>
#include <gdk/gdkrectangle.h>
#include <gdk/gdkrgba.h>
#include <gdk/gdkseat.h>
GdkKeymap * (*get_keymap) (GdkDisplay *display);
- gint (*text_property_to_utf8_list) (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
-
gboolean (*make_gl_context_current) (GdkDisplay *display,
GdkGLContext *context);
+++ /dev/null
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 2000 Red Hat, Inc.
- * 2005 Imendio AB
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-
-#include "gdkinternals.h"
-
-/**
- * SECTION:properties
- * @Short_description: Functions to manipulate properties on windows
- * @Title: Properties and Atoms
- *
- * Each window under X can have any number of associated
- * “properties” attached to it.
- * Properties are arbitrary chunks of data identified by
- * “atom”s. (An “atom”
- * is a numeric index into a string table on the X server. They are used
- * to transfer strings efficiently between clients without
- * having to transfer the entire string.) A property
- * has an associated type, which is also identified
- * using an atom.
- *
- * A property has an associated “format”,
- * an integer describing how many bits are in each unit
- * of data inside the property. It must be 8, 16, or 32.
- * When data is transferred between the server and client,
- * if they are of different endianesses it will be byteswapped
- * as necessary according to the format of the property.
- * Note that on the client side, properties of format 32
- * will be stored with one unit per long,
- * even if a long integer has more than 32 bits on the platform.
- * (This decision was apparently made for Xlib to maintain
- * compatibility with programs that assumed longs were 32
- * bits, at the expense of programs that knew better.)
- *
- * The functions in this section are used to add, remove
- * and change properties on windows, to convert atoms
- * to and from strings and to manipulate some types of
- * data commonly stored in X window properties.
- */
+++ /dev/null
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GDK_PROPERTY_H__
-#define __GDK_PROPERTY_H__
-
-#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
-#error "Only <gdk/gdk.h> can be included directly."
-#endif
-
-#include <gdk/gdktypes.h>
-#include <gdk/gdkversionmacros.h>
-
-G_BEGIN_DECLS
-
-
-GDK_AVAILABLE_IN_ALL
-gint gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
-
-G_END_DECLS
-
-#endif /* __GDK_PROPERTY_H__ */
+++ /dev/null
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#include "config.h"
-
-#include "gdkproperty.h"
-
-#include "gdkdisplayprivate.h"
-
-
-/**
- * gdk_text_property_to_utf8_list_for_display:
- * @display: a #GdkDisplay
- * @encoding: an atom representing the encoding of the text
- * @format: the format of the property
- * @text: (array length=length): the text to convert
- * @length: the length of @text, in bytes
- * @list: (out) (array zero-terminated=1): location to store the list
- * of strings or %NULL. The list should be freed with
- * g_strfreev().
- *
- * Converts a text property in the given encoding to
- * a list of UTF-8 strings.
- *
- * Returns: the number of strings in the resulting list
- */
-gint
-gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
- g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
-
- return GDK_DISPLAY_GET_CLASS (display)
- ->text_property_to_utf8_list (display, encoding, format, text, length, list);
-}
-
'gdkpango.c',
'gdkpixbuf-drawable.c',
'gdkpipeiostream.c',
- 'gdkproperty.c',
'gdkrectangle.c',
'gdkrgba.c',
'gdkseat.c',
'gdkseatdefault.c',
- 'gdkselection.c',
'gdksnapshot.c',
'gdktexture.c',
'gdkvulkancontext.c',
'gdkpaintable.h',
'gdkpango.h',
'gdkpixbuf.h',
- 'gdkproperty.h',
'gdkrectangle.h',
'gdkrgba.h',
'gdkseat.h',
display_class->event_data_free = _gdk_quartz_display_event_data_free;
display_class->create_surface_impl = _gdk_quartz_display_create_surface_impl;
display_class->get_keymap = _gdk_quartz_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
display_class->get_n_monitors = gdk_quartz_display_get_n_monitors;
display_class->get_monitor = gdk_quartz_display_get_monitor;
display_class->get_setting = gdk_quartz_display_get_setting;
/* Display methods - keymap */
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
-gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
G_END_DECLS
#include "config.h"
-#include "gdkproperty.h"
#include "gdkquartz.h"
-static gint
-make_list (const gchar *text,
- gint length,
- gboolean latin1,
- gchar ***list)
-{
- GSList *strings = NULL;
- gint n_strings = 0;
- gint i;
- const gchar *p = text;
- const gchar *q;
- GSList *tmp_list;
- GError *error = NULL;
-
- while (p < text + length)
- {
- gchar *str;
-
- q = p;
- while (*q && q < text + length)
- q++;
-
- if (latin1)
- {
- str = g_convert (p, q - p,
- "UTF-8", "ISO-8859-1",
- NULL, NULL, &error);
-
- if (!str)
- {
- g_warning ("Error converting selection from STRING: %s",
- error->message);
- g_error_free (error);
- }
- }
- else
- str = g_strndup (p, q - p);
-
- if (str)
- {
- strings = g_slist_prepend (strings, str);
- n_strings++;
- }
-
- p = q + 1;
- }
-
- if (list)
- *list = g_new0 (gchar *, n_strings + 1);
-
- i = n_strings;
- tmp_list = strings;
- while (tmp_list)
- {
- if (list)
- (*list)[--i] = tmp_list->data;
- else
- g_free (tmp_list->data);
-
- tmp_list = tmp_list->next;
- }
-
- g_slist_free (strings);
-
- return n_strings;
-}
-
-gint
-_gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
-
- if (encoding == g_intern_static_string ("STRING"))
- {
- return make_list ((gchar *)text, length, TRUE, list);
- }
- else if (encoding == g_intern_static_string ("UTF8_STRING"))
- {
- return make_list ((gchar *)text, length, FALSE, list);
- }
- else
- {
- g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled", (const char *)encoding);
-
- if (list)
- *list = NULL;
-
- return 0;
- }
-}
-
GdkAtom
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
{
display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
display_class->create_surface = _gdk_wayland_display_create_surface;
display_class->get_keymap = _gdk_wayland_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_wayland_display_text_property_to_utf8_list;
display_class->make_gl_context_current = gdk_wayland_display_make_gl_context_current;
#include "gdkdragprivate.h"
#include "gdkinternals.h"
-#include "gdkproperty.h"
#include "gdkprivate-wayland.h"
#include "gdkcontentformats.h"
#include "gdkdisplay-wayland.h"
#include "gdkdropprivate.h"
#include "gdkinternals.h"
-#include "gdkproperty.h"
#include "gdkprivate-wayland.h"
#include "gdkcontentformats.h"
#include "gdkdisplay-wayland.h"
int width,
int height);
-gint _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
-
void _gdk_wayland_display_create_seat (GdkWaylandDisplay *display,
guint32 id,
struct wl_seat *seat);
+++ /dev/null
-/*
- * Copyright © 2010 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <gio/gunixinputstream.h>
-#include <gio/gunixoutputstream.h>
-#include <glib-unix.h>
-
-#include "gdkwayland.h"
-#include "gdkprivate-wayland.h"
-#include "gdkdisplay-wayland.h"
-#include "gdkcontentformatsprivate.h"
-#include "gdkproperty.h"
-
-#include <string.h>
-
-gint
-_gdk_wayland_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- GPtrArray *array;
- const gchar *ptr;
- gsize chunk_len;
- gchar *copy;
- guint nitems;
-
- ptr = (const gchar *) text;
- array = g_ptr_array_new ();
-
- while (ptr < (const gchar *) &text[length])
- {
- chunk_len = strlen (ptr);
-
- if (g_utf8_validate (ptr, chunk_len, NULL))
- {
- copy = g_strndup (ptr, chunk_len);
- g_ptr_array_add (array, copy);
- }
-
- ptr = &ptr[chunk_len + 1];
- }
-
- nitems = array->len;
- g_ptr_array_add (array, NULL);
-
- if (list)
- *list = (gchar **) g_ptr_array_free (array, FALSE);
- else
- g_ptr_array_free (array, TRUE);
-
- return nitems;
-}
-
'gdkkeys-wayland.c',
'gdkmonitor-wayland.c',
'gdkprimary-wayland.c',
- 'gdkselection-wayland.c',
'gdkvulkancontext-wayland.c',
'gdksurface-wayland.c',
'wm-button-layout-translation.c',
/* for CIDA */
#include <shlobj.h>
-#include "gdkproperty.h"
#include "gdkdisplay.h"
#include "gdkprivate-win32.h"
#include "gdkclipboardprivate.h"
return TRUE;
}
-static gint
-make_list (const gchar *text,
- gint length,
- gboolean latin1,
- gchar ***list)
-{
- GSList *strings = NULL;
- gint n_strings = 0;
- gint i;
- const gchar *p = text;
- const gchar *q;
- GSList *tmp_list;
- GError *error = NULL;
-
- while (p < text + length)
- {
- gchar *str;
-
- q = p;
- while (*q && q < text + length)
- q++;
-
- if (latin1)
- {
- str = g_convert (p, q - p,
- "UTF-8", "ISO-8859-1",
- NULL, NULL, &error);
-
- if (!str)
- {
- g_warning ("Error converting selection from STRING: %s",
- error->message);
- g_error_free (error);
- }
- }
- else
- str = g_strndup (p, q - p);
-
- if (str)
- {
- strings = g_slist_prepend (strings, str);
- n_strings++;
- }
-
- p = q + 1;
- }
-
- if (list)
- *list = g_new (gchar *, n_strings + 1);
-
- (*list)[n_strings] = NULL;
-
- i = n_strings;
- tmp_list = strings;
- while (tmp_list)
- {
- if (list)
- (*list)[--i] = tmp_list->data;
- else
- g_free (tmp_list->data);
-
- tmp_list = tmp_list->next;
- }
-
- g_slist_free (strings);
-
- return n_strings;
-}
-
-gint
-_gdk_win32_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list)
-{
- g_return_val_if_fail (text != NULL, 0);
- g_return_val_if_fail (length >= 0, 0);
-
- if (encoding == g_intern_static_string ("STRING"))
- {
- return make_list ((gchar *)text, length, TRUE, list);
- }
- else if (encoding == _gdk_win32_clipdrop_atom (GDK_WIN32_ATOM_INDEX_TEXT_PLAIN_UTF8))
- {
- return make_list ((gchar *)text, length, FALSE, list);
- }
- else
- {
- const char *enc_name = (const char *)encoding;
-
- g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", enc_name);
-
- if (list)
- *list = NULL;
-
- return 0;
- }
-}
-
gint
_gdk_win32_add_contentformat_to_pairs (const gchar *contentformat,
GArray *array)
display_class->create_surface = _gdk_win32_display_create_surface;
display_class->get_keymap = _gdk_win32_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_win32_display_text_property_to_utf8_list;
display_class->make_gl_context_current = _gdk_win32_display_make_gl_context_current;
display_class->get_n_monitors = gdk_win32_display_get_n_monitors;
#define COBJMACROS
#include "gdkdrag.h"
-#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
#include "gdkdropprivate.h"
#include "gdkdrag.h"
-#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
GdkAtom selection,
GdkAtom target,
guint32 time);
-gint _gdk_win32_display_text_property_to_utf8_list (GdkDisplay *display,
- GdkAtom encoding,
- gint format,
- const guchar *text,
- gint length,
- gchar ***list);
gboolean _gdk_win32_keymap_has_altgr (GdkWin32Keymap *keymap);
guint8 _gdk_win32_keymap_get_active_group (GdkWin32Keymap *keymap);
#include <glib/gprintf.h>
#include <pango/pangowin32.h>
-#include "gdkproperty.h"
#include "gdkdisplayprivate.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
display_class->create_surface = _gdk_x11_display_create_surface;
display_class->get_keymap = gdk_x11_display_get_keymap;
- display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
#include "gdksurfaceprivate.h"
#include "gdkinternals.h"
#include "gdkintl.h"
-#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkscreen-x11.h"
#include "gdkselectioninputstream-x11.h"
#include "gdkdragprivate.h"
#include "gdkinternals.h"
#include "gdkintl.h"
-#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkscreen-x11.h"
#include "gdkselectioninputstream-x11.h"
#include "config.h"
-#include "gdkproperty.h"
#include "gdkinternals.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
#include "config.h"
-#include "gdkproperty.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"